package com.wxq.weitool;

import java.time.format.DateTimeFormatter;

public class Dates {


    public static interface Pattern{

        /**
         * 只有日期 年月日<span style="color:green"><code>{@value}</code></span>.
         * <p>
         * example:<span style="color:green">2012-01-22</span>
         * </p>
         *
         * 
         */
        public static final String DATE                                  = "yyyy-MM-dd";

        /**
         * 不带秒 <span style="color:green"><code>{@value}</code></span>.
         *
         * <p>
         * example: <span style="color:green">2013-12-27 22:13</span>
         * </p>
         */
        public static final String DATE_TIME_NO_SECOND          = "yyyy-MM-dd HH:mm";

        /**
         * <span style="color:green"><code>{@value}</code></span>.
         * <p>
         * example:<span style="color:green">2013-12-27 22:13:55</span>
         * </p>
         */
        public static final String DATE_TIME                         = "yyyy-MM-dd HH:mm:ss";

        /**
         * 带毫秒的时间格式 <span style="color:green"><code>{@value}</code></span>.
         *
         * <p>
         * example: <span style="color:green">2013-12-27 22:13:55.453</span>
         * </p>
         */
        public static final String DATE_TIME_MILLISECOND        = "yyyy-MM-dd HH:mm:ss.SSS";
    }

    public static class DateFormat{
        /**
         * 只有日期 年月日<span style="color:green"><code>{@value}</code></span>.
         * <p>
         * example:<span style="color:green">2012-01-22</span>
         * </p>
         *
         * 
         */
        public static final DateTimeFormatter DATE  =DateTimeFormatter.ofPattern(Pattern.DATE);
        /**
         * 不带秒 <span style="color:green"><code>{@value}</code></span>.
         *
         * <p>
         * example: <span style="color:green">2013-12-27 22:13</span>
         * </p>
         */
        public static final DateTimeFormatter DATE_TIME_NO_SECOND  =DateTimeFormatter.ofPattern(Pattern.DATE_TIME_NO_SECOND);
        /**
         * <span style="color:green"><code>{@value}</code></span>.
         * <p>
         * example:<span style="color:green">2013-12-27 22:13:55</span>
         * </p>
         */
        public static final DateTimeFormatter DATE_TIME  =DateTimeFormatter.ofPattern(Pattern.DATE_TIME);
        /**
         * 带毫秒的时间格式 <span style="color:green"><code>{@value}</code></span>.
         *
         * <p>
         * example: <span style="color:green">2013-12-27 22:13:55.453</span>
         * </p>
         */
        public static final DateTimeFormatter DATE_TIME_MILLISECOND  =DateTimeFormatter.ofPattern(Pattern.DATE_TIME_MILLISECOND);
    }
}
